//package cn.donting.web.desktop.core.domain;
//
//import cn.donting.web.desktop.core.entity.AppInfo;
//import cn.donting.web.desktop.core.entity.User;
//import cn.donting.web.desktop.core.exception.TaskException;
//import lombok.Getter;
//
//@Getter
//public class TaskEntity {
//    private final Task task;
//    private final AppInfo appInfo;
//    private final Long taskId;
//    private final User user;
//
//    public TaskEntity(Task task, AppInfo appInfo, User user) {
//        this.task = task;
//        this.appInfo = appInfo;
//        this.taskId = creatTaskId();
//        this.user = user;
//        if(user==null){
//           throw  new TaskException("登录用户为 null");
//        }
//    }
//
//    private static Long taskIdAuto = 1L;
//
//    private static synchronized Long creatTaskId() {
//        return ++taskIdAuto;
//    }
//}
